# %Id%
# 
# Description: Include make file containing predefined rules 
# of compilation and suffix rules.
# 
# Module: Make Utilities

#	C language section

COMPILE.c= $(CC) $(CFLAGS) $(CPPFLAGS) -c
LINK.c= $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)

#	C++ language section

COMPILE.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS)  -c
LINK.cc= $(CCC) $(CCFLAGS) $(CPPFLAGS) $(LDFLAGS)

OUTPUT_OPTION= -o $@

#	Miscellaneous section

CP= cp
FLEX = flex
CC   = cc

# 	Redefinition of suffixes rules

.SUFFIXES: .l .c

# Changes the default suffix rule for .l lex extension
# since we use flex instead of lex

.l:
	$(RM) $(@F).yy.c
	$(FLEX) -o$(@F).yy.c $<
	$(CC) $(@F).yy.c -lfl -o $@
	$(RM) $(@F).yy.c

.c:
	$(LINK.c) $(OUTPUT_OPTION) $< $(LDLIBS)



